<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <style>
        .body-wrap {
            list-style: none;
            display: flex;
            margin: 0;
            padding: 0;
        }

        .header-wrap li,
        .body-wrap li {
            width: 400px;
            text-align: center;
        }

        /* 高度等于content-wrap的高度 */
        .scroll-wrap {
            height: 85px;
            overflow: hidden;
        }

        .content-wrap {
            transform: translateY(0);
            animation: scroll-effect infinite 3s linear;
        }

        @keyframes scroll-effect {
            from {
                transform: translateY(0);
            }
            to {
                transform: translateY(-85px);
                /* 移动的距离是content-wrap的高度，然后infinite折返回来，这样就看不出破绽了 */
            }
        }
    </style>
</head>

<body>
<div class="infinite-scroll-wrap">
    <div class="scroll-wrap">
        <div class="content-wrap">
            <ul class="body-wrap">
                <li class="header">1</li>
                <li class="header">苹果</li>
                <li class="header">12</li>
                <li class="header">5</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">2</li>
                <li class="header">香蕉</li>
                <li class="header">9</li>
                <li class="header">4</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">3</li>
                <li class="header">橘子</li>
                <li class="header">13</li>
                <li class="header">7</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">4</li>
                <li class="header">火龙果</li>
                <li class="header">16</li>
                <li class="header">1</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">1</li>
                <li class="header">苹果</li>
                <li class="header">12</li>
                <li class="header">5</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">2</li>
                <li class="header">香蕉</li>
                <li class="header">9</li>
                <li class="header">4</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">3</li>
                <li class="header">橘子</li>
                <li class="header">13</li>
                <li class="header">7</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">4</li>
                <li class="header">火龙果</li>
                <li class="header">16</li>
                <li class="header">1</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">1</li>
                <li class="header">苹果</li>
                <li class="header">12</li>
                <li class="header">5</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">2</li>
                <li class="header">香蕉</li>
                <li class="header">9</li>
                <li class="header">4</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">3</li>
                <li class="header">橘子</li>
                <li class="header">13</li>
                <li class="header">7</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">4</li>
                <li class="header">火龙果</li>
                <li class="header">16</li>
                <li class="header">1</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">1</li>
                <li class="header">苹果</li>
                <li class="header">12</li>
                <li class="header">5</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">2</li>
                <li class="header">香蕉</li>
                <li class="header">9</li>
                <li class="header">4</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">3</li>
                <li class="header">橘子</li>
                <li class="header">13</li>
                <li class="header">7</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">4</li>
                <li class="header">火龙果</li>
                <li class="header">16</li>
                <li class="header">1</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">1</li>
                <li class="header">苹果</li>
                <li class="header">12</li>
                <li class="header">5</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">2</li>
                <li class="header">香蕉</li>
                <li class="header">9</li>
                <li class="header">4</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">3</li>
                <li class="header">橘子</li>
                <li class="header">13</li>
                <li class="header">7</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">4</li>
                <li class="header">火龙果</li>
                <li class="header">16</li>
                <li class="header">1</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">1</li>
                <li class="header">苹果</li>
                <li class="header">12</li>
                <li class="header">5</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">2</li>
                <li class="header">香蕉</li>
                <li class="header">9</li>
                <li class="header">4</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">3</li>
                <li class="header">橘子</li>
                <li class="header">13</li>
                <li class="header">7</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">4</li>
                <li class="header">火龙果</li>
                <li class="header">16</li>
                <li class="header">1</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">1</li>
                <li class="header">苹果</li>
                <li class="header">12</li>
                <li class="header">5</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">2</li>
                <li class="header">香蕉</li>
                <li class="header">9</li>
                <li class="header">4</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">3</li>
                <li class="header">橘子</li>
                <li class="header">13</li>
                <li class="header">7</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">4</li>
                <li class="header">火龙果</li>
                <li class="header">16</li>
                <li class="header">1</li>
            </ul>
        </div>
        <div class="content-wrap">
            <ul class="body-wrap">
                <li class="header">1</li>
                <li class="header">苹果</li>
                <li class="header">12</li>
                <li class="header">5</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">2</li>
                <li class="header">香蕉</li>
                <li class="header">9</li>
                <li class="header">4</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">3</li>
                <li class="header">橘子</li>
                <li class="header">13</li>
                <li class="header">7</li>
            </ul>
            <ul class="body-wrap">
                <li class="header">4</li>
                <li class="header">火龙果</li>
                <li class="header">16</li>
                <li class="header">1</li>
            </ul>
        </div>
    </div>
</div>
</body>
</html>